package com.kma.summer2012.client.events.request;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.kma.summer2012.shared.model.UICrumbsRequest;

import java.util.List;

public class SendForProcessingRequestEvent extends GwtEvent<SendForProcessingRequestEvent.SendForProcessingRequestEventHandler> {
    private static Type<SendForProcessingRequestEventHandler> TYPE = new Type<SendForProcessingRequestEventHandler>();

    public List<UICrumbsRequest> requests = null;

    public SendForProcessingRequestEvent(List<UICrumbsRequest> requests) {
        this.requests = requests;
    }

    @Override
    public Type<SendForProcessingRequestEventHandler> getAssociatedType() {
        return TYPE;
    }

    @Override
    protected void dispatch(SendForProcessingRequestEventHandler sendEventHandler) {
        sendEventHandler.OnReject(this);
    }

    public static Type<SendForProcessingRequestEventHandler> getType() {
        return TYPE;
    }

    public interface SendForProcessingRequestEventHandler extends EventHandler {
        void OnReject(SendForProcessingRequestEvent event);
    }
}